]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
viewSelector: Tie workspace fit mode to adjustment
authorGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Tue, 29 Dec 2020 21:51:40 +0000 (18:51 -0300)
committerMarge Bot <marge-bot@gnome.org>
Wed, 3 Feb 2021 20:30:30 +0000 (20:30 +0000)
Tie the fit mode adjustment of WorkspacesDisplay to the
state adjustment of AppPagesContainer, and transition to
the ALL fit mode when the app grid is visible.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1613>

js/ui/viewSelector.js
js/ui/workspacesView.js

index 72f068aa4951108dee1c042a28cc533f5420dbf1..b1206188928e78a10c62da5ae0e3a925d576b89f 100644 (file)
@@ -181,6 +181,12 @@ class ActivitiesContainer extends St.Widget {
             opacity: Util.lerp(0, 255, 1 - progress),
             visible: (1 - progress) !== 0,
         });
+
+        const { fitModeAdjustment } = this._workspacesDisplay;
+        fitModeAdjustment.value = Util.lerp(
+            WorkspacesView.FitMode.SINGLE,
+            WorkspacesView.FitMode.ALL,
+            progress);
     }
 
     _getWorkspacesBoxes(box, thumbnailsHeight) {
index 3f3cc3edbc89e5b5e9c0ab853a659b1601549f62..93782f431b2af6f4c171ccc726b27d30ddc75c12 100644 (file)
@@ -967,4 +967,8 @@ class WorkspacesDisplay extends St.Widget {
         Main.wm.actionMoveWorkspace(ws);
         return Clutter.EVENT_STOP;
     }
+
+    get fitModeAdjustment() {
+        return this._fitModeAdjustment;
+    }
 });